<?php

/**
 * Author : 小麦
 * 通用上传类
 */
namespace Common\Lib\Util;
class Upload {

	public function savelocalfile(){
		
		$upload = new \Think\Upload();// 实例化上传类
		$upload->maxSize = 3145728 ;// 设置附件上传大小
		$upload->exts = array('jpg', 'gif', 'png', 'jpeg');// 设置附件上传类型
		$upload->savePath = C('ik_attach_path'); // 设置附件上传目录
		
		$info   =   $upload->upload();
	    if(!$info) {
			return $upload->getError();
	    }else{
			return true;
		}
	}
	
}
